from selenium.webdriver.common.by import By
import time
from common.base import Base


# https://ecshop.test2.shopex123.com/user.php

class Login_page(Base):
    def username(self,username):
        time.sleep(2)
        self.send_keys((By.NAME,'username'),username)

    def password(self,password):
        time.sleep(2)
        self.send_keys((By.NAME,'password'),password)

    def remember(self):
        self.click((By.ID,'remember'))

    def loginbth(self):
        time.sleep(2)
        self.click((By.CLASS_NAME,'loginbtn'))





if __name__ == '__main__':
    log =Login_page('chrome')
    log.input_url('https://ecshop.test2.shopex123.com/user.php')
    log.username('test1')
    log.password('dyh730201!')
    log.remember()
    log.loginbth()
    log.refresh()
    log.back()
    log.forward()
    log.quit()


